package com.chx.ajxtest.service.impl;

import com.chx.ajxtest.bean.Travel;
import com.chx.ajxtest.mapper.TravelMapper;
import com.chx.ajxtest.service.TravelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TravelServiceImpl implements TravelService {

    @Autowired
    private TravelMapper travelMapper;

    @Override
    public List<Travel> queryAll(Integer id) throws Exception {
        return travelMapper.queryAll(id);
    }

    @Override
    public void deleteById(Integer id) throws Exception {
        travelMapper.deleteById(id);
    }

    @Override
    public void add(Travel travel) throws Exception {
        travelMapper.add(travel);
    }

    @Override
    public void update(Travel travel) throws Exception {
        travelMapper.update(travel);
    }
}
